<?php
namespace app\home\controller;
use think\Db;
use think\captcha\Captcha;
use think\Loader;
class Index extends \think\Controller{
    public function index(){
        $reslist=db('admin_addshop')->select();

        $data=array();
        foreach($reslist as $val){
            $img=json_decode($val['img'],true);
            if($img!=NULL){
                $val['img']=$img;
            }
            $data[]=$val;
        }
        $this->assign('reslist',$data);

        return $this->fetch('index');//继承基类的控制器 
    }

    
}